/*
 * @Description: 预约单查询
 * @Autor: 何兴家
 * @Date: 2020-11-30 15:29:20
 * @LastEditors: 何兴家
 * @LastEditTime: 2021-02-18 13:54:18
 */
import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 查询预约单列表
export const queryPrecontractOrder = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/queryPrecontractOrder`, {
    params
  });

// 取消预约
export const cancelBookingOrderWithReason = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/cancelPrecontractOrder`, params);

// 查询预约单提醒记录
export const queryPrecontractOrderPrompt = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/queryPrecontractOrderPrompt`, {
    params
  });

// 保存预约提醒
export const savePrecontractOrderPrompt = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/savePrecontractOrderPrompt`, params);

// 删除预约提醒记录
export const deletePrecontractOrderPrompt = params => axios.post(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/deletePrecontractOrderPrompt`, params);

// 预约导出
export const precontractOrderExport = params =>
  axios.get(`${SERVER.DMSCLOUD_REPAIR}/precontractStatus/precontractOrderExport`, {
    params,
    responseType: 'blob'
  });
